package Text01;

class Fruit {
    private String name;
    private String area;
    private double price;

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getArea() {
        return area;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public double getPrice() {
        return price;
    }
}

public class Work03 {
    public static void main(String[] args) {
        Fruit fruit1 = new Fruit();
        fruit1.setName("苹果");
        fruit1.setArea("河北");
        fruit1.setPrice(10.0);

        Fruit fruit2 = new Fruit();
        fruit2.setName("香蕉");
        fruit2.setArea("西双版纳");
        fruit2.setPrice(9.4);

        Fruit fruit3 = new Fruit();
        fruit3.setName("橙子");
        fruit3.setArea("德宏");
        fruit3.setPrice(5.8);

        System.out.println(fruit1.getName() + "，产地：" + fruit1.getArea() + "，单价：" + fruit1.getPrice());
        System.out.println(fruit2.getName() + "，产地：" + fruit2.getArea() + "，单价：" + fruit2.getPrice());
        System.out.println(fruit3.getName() + "，产地：" + fruit3.getArea() + "，单价：" + fruit3.getPrice());
    }
}